<?php
/**
 * Created by PhpStorm.
 * User: o0无忧亦无佈(285753421@qq.com)
 * Date: 15-2-15
 * Time: 下午8:17
 */

class MY_Api_Controller extends MY_Portal_Controller{
    function __construct(){
        parent::__construct();
        $this->load->model('api/apps');
    }

    protected function _verify($token){
        $result = $this->apps->verify_token($token);
        if(!$result)
            $this->_json(array('state'=>false,'msg'=>'token error'));
    }

    protected function _verify_operate($user_id,$token){
        $result = $this->apps->verify_operate_token($user_id,$token);
        if(!$result)
            $this->_json(array('state'=>false,'msg'=>'token error'));
    }
}